﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Tasks;

namespace RSUDay1
{
    public partial class AboutPage : PhoneApplicationPage
    {
        public AboutPage()
        {
            InitializeComponent();
            //App app = App.Current as App;
            //app.vdo
        }

        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            string vdoname = "";
            if (NavigationContext.QueryString.TryGetValue("vdo", out vdoname)) {
                PageTitle.Text = vdoname;
            }
            
        }

        private void openWebSiteLink_Click(object sender, System.Windows.RoutedEventArgs e)
        {
        	WebBrowserTask web = new WebBrowserTask();
			web.URL = "http://www.youtube.com";
			web.Show();
        }

        private void sendMail_Click(object sender, System.Windows.RoutedEventArgs e)
        {
        	EmailComposeTask email = new EmailComposeTask();
			email.To = "songyoug@hotmail.com";
			email.Subject = "Feedback";
			email.Body = "";
			email.Show();
			/*
			PhoneCallTask phone = new PhoneCallTask();
			phone.DisplayName = "SongYoug Gook";
			phone.PhoneNumber = "77 123 456";
			phone.Show();
			*/
        }

        private void openMap_Click(object sender, System.Windows.RoutedEventArgs e)
        {
        	BingMapsTask map = new BingMapsTask();
			map.SearchTerm = "Soul, Korea";
		    //map.Center = new GeoCoordinate(10.0123,110.11233);
			map.ZoomLevel = 10.0;
			map.Show();
        }
    }
}
